# -*- coding: utf-8 -*-
import tkinter
from tkinter import messagebox


def message_showinfo(title, message):
    top = tkinter.Tk()
    # 实现主窗口隐藏
    top.withdraw()
    # 需要update一下
    top.update()
    messagebox.showinfo(title, message)
    top.destroy()


def find_str_in_list(needs_find_str, str_list):
    for match_file_name in str_list:
        if match_file_name.find(needs_find_str) != -1:
            return match_file_name

    return ""
